home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iFaction.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  3KB  |  123 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // iFaction.h
  5. //
  6. // API for the package iFaction.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header:
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(iFaction);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "ifaction" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24. #else
  25.  
  26. // Dependencies
  27. uses String, List, MapEnumerations;
  28.  
  29. // Declare the ship handle type
  30. handle hfaction : hobject;
  31.  
  32. // Enumeration of types of feelings
  33. enum eFeelingType { FT_Hate, FT_Dislike, FT_Neutral, FT_Like, FT_Love };
  34.  
  35. //
  36. // hfaction iFaction.Cast( hobject o )
  37. //
  38. // Cast an hobject to an hfaction
  39. //
  40. prototype hfaction iFaction.Cast( hobject o );
  41.  
  42. //
  43. // hfaction iFaction.Create( string name, 
  44. //                           string prefix,
  45. //                           IeAllegiance allegiance )
  46. //
  47. // Create a new faction. It starts with neutral attitudes to all
  48. // existing factions.
  49. //
  50. prototype hfaction iFaction.Create( string name, 
  51.                                     string prefix, 
  52.                                     IeAllegiance allegiance );
  53.  
  54. //
  55. // string iFaction.Name( hfaction faction )
  56. //
  57. // Get the facation name
  58. //
  59. prototype string iFaction.Name( hfaction faction );
  60.  
  61. //
  62. // hfaction iFaction.Find( string name )
  63. //
  64. // Find a faction handle
  65. //
  66. prototype hfaction iFaction.Find( string name );
  67.  
  68. //
  69. // list iFaction.All()
  70. //
  71. // Get a list of all factions
  72. //
  73. prototype list iFaction.All();
  74.  
  75. //
  76. // float iFaction.Feeling( hfaction feeler, hfaction feelee )
  77. //
  78. // Find out how a faction feels toward another faction. Result is
  79. // in the range [-1, 1] with -1 = hatred, 0 = neutral, +1 = love.
  80. // Either faction invalid returns zero.
  81. //
  82. prototype float iFaction.Feeling( hfaction feeler, hfaction feelee );
  83.  
  84. //
  85. // eFeelingType iFaction.FeelingType( float level )
  86. //
  87. // Find out which feeling type the level falls within
  88. //
  89. prototype eFeelingType iFaction.FeelingType( float level );
  90.  
  91. //
  92. // float iFaction.FeelingLevel( eFeelingType )
  93. //
  94. // Find the midpoint level of the feeling type
  95. //
  96. prototype float iFaction.FeelingLevel( eFeelingType type );
  97.  
  98. //
  99. // iFaction.SetFeeling( hfaction feeler, hfaction feelee, float level )
  100. //
  101. // Set the feeling of a faction towards another faction
  102. //
  103. prototype iFaction.SetFeeling( hfaction feeler, hfaction feelee, float level );
  104.  
  105. //
  106. // iFaction.IncrementFeeling( hfaction feeler, hfaction feelee,
  107. //                            float level_increase )
  108. //
  109. // Increment the feeling between a faction and another faction.
  110. //
  111. prototype iFaction.IncrementFeeling( hfaction feeler, hfaction feelee,
  112.                                      float level_increase );
  113.  
  114. //
  115. // IeAllegiance iFaction.Allegiance( hfaction faction )
  116. //
  117. // Get this faction's allegiance (value from the IeAllegiance enumeration in
  118. // MapEnumerations)
  119. //
  120. prototype IeAllegiance iFaction.Allegiance( hfaction faction );
  121.  
  122. #endif // FLUX_LIB
  123.